<% if @contact.errors.blank? %>
  <% if @contact.options_for_select.count == 1 %>
    $('.contact-button-single-<%= @contact.id %>').replaceWith("<%= j render(partial: 'contacts/button_simple', object: @contact, as: :contact) %>");
  <% end %>
  SocialStream.Contact.destroy({ id: "<%= @contact.id %>" });
<% else %>
  SocialStream.Flash.error("<%= @contact.errors.full_messages.to_sentence %>");
<% end %>
